<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>产品参数打印</title>
<link href="__TPL_CSS__/color_lable.css?t={:time()}" rel="stylesheet" type="text/css"/>

</head>

<body>
<div class="print_but">
  <p><a href="javascript:prnt_preview()">打印预览</a></p>
</div>

<div class="print-page" id="printDiv">
  <div class="orderprint">
      {volist name="T" id="v"}
          <!--<php>$count++</php>-->
          <div class="labelbox">
            <div class="top">
              <div>产品参数</div>
            </div>
            <table class="pro-info">
              <tbody>
                    <tr>
                        <td width="16%">编号</td>
                        <td colspan="3" width="84%" class="lf">{$v.number}</td>
                    </tr>
                    <tr>
                        <td width="16%">品名</td>
                        <td colspan="3" width="84%" class="lf">{$v.title}</td>
                    </tr>
                    <tr>
                        <td width="16%">幅宽</td>
                        <td width="30%" class="lf">{$v.breadth} cm</td>
                        <td width="16%">克重</td>
                        <td width="38%" class="lf">约{$v.square}G</td>
                    </tr>
                    <tr>
                        <td width="16%">大货</td>
                        <td colspan="3" width="84%" class="lf">毛重一公斤约出{$v.kgm}米</td>
                    </tr>
                    <tr>
                        <td width="16%">毛重</td>
                        <td colspan="3" width="84%" class="lf">含纸管：{$v.tube}KG&nbsp;&nbsp;空差：{$v.emptykg}KG</td>
                    </tr>
                    <tr>
                        <td width="16%">成分</td>
                        <td colspan="3" width="84%" class="lf">{$v.component}&nbsp;&nbsp;(花灰另问)</td>
                    </tr>
                </tbody>
            </table>
            <div class="foot">花灰、活性黑、撞白色、部分深色价格另问</div>
          </div>
      {/volist}
  </div>
</div>

<script src="__JS__/jquery.1.8.3.js"></script>
<script type="text/javascript" src="__TOOL__/print/LodopFuncs.js" charset="utf-8"></script>
<object  id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0> 
       <embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0></embed>
</object>
<script>
var print_id='printDiv';
setTimeout("CheckIsInstall()","1000");
function CheckIsInstall() {  
    try{ 
        var LODOP=getLodop(); 
        if (LODOP.VERSION) {
           if (LODOP.CVERSION){
           //alert("当前有C-Lodop云打印可用!\n C-Lodop版本:"+LODOP.CVERSION+"(内含Lodop"+LODOP.VERSION+")"); 
           }else{
           //alert("本机已成功安装了Lodop控件！\n 版本号:"+LODOP.VERSION); 
           }
        };
       }catch(err){ 
     }
  }; 

//动态绑定VAL的值
$(document).ready(function(){
  $("input").change(function(){
    if($('#sync').is(':checked')){
      var name=$(this).attr('name');
      var val=$(this).val();
      $('[name="'+name+'"]').attr('value',val);
    }else{
      $(this).attr('value',$(this).val());
    }
  });
  /*$(window).bind('beforeunload', function () {
  });*/

})

var LODOP; //声明为全局变量 
function getid(id){
  return document.getElementById(id);
}
function prnt_preview() { 
  CreateOneFormPage();  
  LODOP.PREVIEW();  
};
function CreateOneFormPage(){
  var cssStyle='<link href="__TPL_CSS__/color_lable.css?t={:time()}" rel="stylesheet" type="text/css"/>';
  var printArea=getid(print_id).innerHTML;
  printArea=cssStyle+'<body>'+printArea+'</body>';

  LODOP=getLodop();  
  LODOP.PRINT_INIT();
  LODOP.SET_PRINT_STYLEA(1,"Horient",3);
  LODOP.SET_PRINT_PAGESIZE(1,'70mm','50mm','CreateCustomPage');
  LODOP.SET_PRINT_STYLE("FontSize",13);
  LODOP.SET_PRINT_MODE("POS_BASEON_PAPER",true);
  LODOP.SET_PRINTER_INDEX('Deli DL-730C(NEW)');       //设置默认打印机
  LODOP.SET_PREVIEW_WINDOW(0,0,0,800,600,"");         //自定义窗口
  LODOP.SET_PRINT_MODE ("PRINT_END_PAGE",{$count});         //设置从第-1页结束打印
  LODOP.ADD_PRINT_HTM(0,0,'70mm','50mm',printArea);
};

</script>
</body>
</html>